Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 8 - TCP/IP Services / TCP/IP Services Reference
Functions / Address Utilities


OTInitInetAddress

Fills in an InetAddress structure with the data you provide.

C INTERFACE
void OTInitInetAddress (InetAddress *addr,
                        InetPort port,
                        InetHost host);
C++ INTERFACE
None. C++ clients use the C interface to this function.

PARAMETERS
addr
A pointer to an InetAddress structure that you allocate. The function fills in this structure.
port
The port number of the address.
host
The IP address of the host in network byte order (that is, high-order byte first) in hexadecimal format. This must be a fully qualified address.
DESCRIPTION
This function fills in the fAddressType field of the InetAddress structure with the value AF_INET. You use the InetAddress structure when providing a TCP or UDP address to the Open Transport functions OTConnect, OTSndURequest, and OTBind. You are not required to use the OTInitInetAddress function when creating an InetAddress structure; this function is provided for your convenience only.

SEE ALSO
The InetAddress structure is described in "Internet Address Structure" on page 8-22.

You can use the OTInetStringToHost function (page 8-54) to put the address in InetHost format.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996